<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand">
                <span>全明星棒球</span>
            </a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <c:if test="${sessionUser!=null}">
                    <li><a href="#">${sessionUser.username}</a></li>
                </c:if>
                <c:if test="${sessionUser==null}">
                    <li><a href="/login.do">登录</a></li>
                    <li><a href="/register.do">注册</a></li>
                </c:if>

            </ul>
            <ul class="nav navbar-nav navbar-right">

                <c:if test="${sessionUser!=null}">
                    <c:if test="${sessionUser.type == 'admin'}">
                        <li><a href="/member/course/list.do">课程管理</a></li>
                        <li><a href="/member/user/list.do">用户管理</a></li>
                        <li><a href="/member/activity/list.do">活动管理</a></li>
                        <li><a href="/member/activity/add.do">添加活动</a></li>
                    </c:if>
                    <c:if test="${sessionUser.type == 'jl'}">
                        <li><a href="/member/course/myList.do">我的课程</a></li>
                        <li><a href="/member/course/add.do">添加课程</a></li>
                    </c:if>
                    <li><a href="#" data-toggle="modal" data-target="#mdf">修改密码</a></li>
                    <li><a href="/logout.do">退出</a></li>
                </c:if>
            </ul>
        </div>
    </div>
</nav>


<div id="mdf" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">修改密码</h4>
            </div>
            <div class="modal-body">
                <form  name="form" id="form" class="form-horizontal" method="post" action="/member/modify.do">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">原密码</label>
                        <div class="col-sm-10">
                            <input type="password" required class="form-control" name="pwd">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-sm-2 control-label">新密码</label>
                        <div class="col-sm-10">
                            <input type="password" required class="form-control" name="pwd2">
                        </div>
                    </div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="submit" form="form" class="btn btn-primary">修改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
